<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:head>
        <title>Perfil Aluno</title>
    </h:head>
    <h:body>    
        <ui:composition template="./face-professor.xhtml">
            <ui:define name="login"><h:outputText id="lblBemVindo" value="#{login.aluno.nome}" /></ui:define>
            <ui:define name="content">
                <h:form> 
                    Bem Vindo: <h:outputText id="lblNomeLogin" value="#{login.aluno.nome} " />
                    <p:panel header="Informações do Aluno">          
                        <h:panelGrid columns="2" >
                            <h:outputLabel id="lblNomeAluno" value="Nome:"/>
                            <h:outputText id="lblNome" value="#{login.aluno.nome} " />
                            <h:outputLabel id="lblSobrenomeAluno" value="Sobrenome:"/>
                            <h:outputText id="lblSobrenome" value="#{login.aluno.sobrenome} " />
                            <h:outputLabel id="lbldataNascimento" value="Data Nascimento:"/>
                            <p:calendar value="#{login.aluno.dataNascimento}" disabled="true" />
                            <h:outputLabel id="lblRG" value="RG:"/>
                            <h:outputText id="lblRg" value="#{login.aluno.rg} " />
                            <h:outputLabel id="lblCPF" value="CPF:"/>
                            <h:outputText id="lblCpf" value="#{login.aluno.cpf} " />
                        </h:panelGrid>
                    </p:panel>            
                    <p:panel header="Treino">                
                        <h:panelGrid columns="2" >
                            <h:outputLabel id="lblTipoTreino" value="Tipo Treino Atual:"/>
                            <h:outputText id="txtTipoTreinoNome" value="#{login.treino.tipoTreino.nome}" />
                            <h:outputLabel id="lblDataInicio" value="Data de Início: " />
                            <p:calendar value="#{login.treino.dataInicio}" disabled="true" />
                            <h:outputLabel id="lblDataAtualizacao" value="Data de Atualização: " />
                            <p:calendar value="#{login.treino.dataAtualizacao}" disabled="true" />
                            <h:outputLabel id="lblDataExpira" value="Data que Expira: " />
                            <p:calendar value="#{login.treino.dataExpira}" disabled="true"/>
                        </h:panelGrid>
                    </p:panel>
                    <p:panel header="Exercícios">                
                        <h:panelGrid columns="2" >
                            <p:dataTable id="dttExercicios" value="#{login.exercicios}" var="ex">
                                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="Código do Exercício"/>
                                    </f:facet>
                                    <h:outputText value="#{ex.id}"/>
                                </p:column>
                                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="Nome do Exercício"/>
                                    </f:facet>
                                    <h:outputText value="#{ex.nome}" />
                                </p:column>
                            </p:dataTable>
                        </h:panelGrid>
                    </p:panel>
                </h:form> 
            </ui:define>
        </ui:composition>
    </h:body>
</html>
